The present invention relates in general to a database processing method and a system for processing a database, and more particularly to a database processing method and a system in which an index access is carried out using a user definition function by which a data type and its behavior can be defined by a user.
Currently, in a database language SQL, the standardization of an SQL3 (ISO, ANSI) has been promoted. As one of the primary functions of the SQL3, there is an ADT (Abstract Data Type).
By the ADT is meant a data type to be defined by some user definition wherein the object-oriented concept is introduced thereinto, and the operation for the ADT data is defined in the form of a method (a function or a procedure) by a user. If the ADT is employed, then it is possible to implement the complicated data structure as data in the database. In addition, the behavior (accompanying function) of the ADT data can be defined in the form of an ADT function.
In the definition of the ADT, both the specification of the attributes used to express the ADT value, and the specification of the ADT functions used to implement the behavior thereof, are defined. The ADT definition information is, similarly to table definition information and the like, managed as the dictionary information in a database management system in many cases.
For the definition of the ADT function, it is also possible to specify a module which is described with a general programming language such as an SQL itself or a C language to be compiled in order to be registered in a system. The relation between the program module used to implement the ADT function and the ADT function is described in an ADT definition statement for defining the ADT (e.g., a CREATE TYPE statement in the SQL).
The use of the ADT results in the function coping with the multimedia data being able to be implemented in the form of a function of the database management system. This means that the processing which has been conventionally executed with an application program can be implemented in the database system at a high speed and with a low development cost.
On the other hand, in a general search system, in order to implement a certain special function at a high speed, the access method unique to that function is utilized in many cases. As a typical one, an index is given as an example.
For example, in a full text search system, there is used a dedicated index which is constituted by keywords extracted from the documents for searching some keywords in documents at a high speed, a character component table or the like. In addition, in many database management systems, by using an access method such as a B-tree index self-contained in the system, the promotion of a user query processing, i.e., a retrieval processing has been made.
With respect to the ADT data as well, there can be considered the utilization of a special index for implementing the evaluation peculiar to a certain ADT, i.e., the retrieval evaluation or the high speed evaluation (retrieval evaluation). In order to have sufficiently the benefits of the ADT, however, the means for adding an access method of the user definition, i.e., an index is required for the database management system.
Now, in the conventional database processing method, as for one approach of adding the user-defined index, there is given as an example a method wherein an access method to implement the ADT function at a high speed is contained in the module for implementing the ADT function. In this case, however, since the module for implementing the ADT function has a function of accessing to the user-defined index, the user definition index of interest is fastened to the ADT, and hence will lose the independency for the ADT.
Therefore, in the above-mentioned conventional database processing method, if the function of accessing to the user definition index is self-contained in the ADT function, then, there arises a problem that however usefully and generally the index is designed, that index cannot be utilized from other ADTS.
In addition, it is impossible to support the indexes coping with all the data such as not only the B-tree index, but also the index for text search or the index for image search, within the above-mentioned conventional database management system. Then, there arises another problem that if the indexes coping with many data are supported, then the database management system will become larger in scale, and hence all the worse, the unnecessary index module will be self-contained for some users.
In the light of the foregoing problems associated with the prior art, it is therefore an object of the present invention to provide a database processing method and a system by which a general database processing can be carried out independent of a specific user-defined function, and a recording medium for implementing the method and the system.
It is another object of the present invention to provide a relational database processing method and a system by which an implementation module for carrying out a specific index access can be made independent of a user-defined function, and a recording medium for implementing the method and the system.
It is still another object of the present invention to provide a relational database processing technology by which only an implementation module required for a database can be self-contained.
The outline of a typical one of the inventions disclosed in the present application will be simply described as follows.
That is, a relational database processing method of executing a function, which is previously defined and registered in a database, in accordance with a processing request to execute a database processing, includes the step of selecting, when a user-defined function in processing request for the database is set in correspondence to a specific index on the basis of the above-mentioned index definition information, a specific implementation module for carrying out an access using the specific index from the module definition information, and the step of executing the database processing using the implementation module thus selected.
As described above, according to the database processing method of the present invention, by preparing the function in which the user-defined function in processing request is defined in the index definition information, the implementation module corresponding to the above-mentioned user-defined function is executed to carry out the index access. As a result, it is possible to execute the database processing by the user-defined index independent of a specific user-defined function.
Other objects, features and advantages of the present invention will become apparent from reading the following description of the embodiments of the invention taken in conjunction with the accompanying drawings.